import Cookies from 'js-cookie';

const TokenKey = 'uap-Token';

export function getToken() {
  return Cookies.get(TokenKey);
}

export function setToken(token: string) {
  return Cookies.set(TokenKey, token);
}

export function removeToken() {
  return Cookies.remove(TokenKey);
}

export function getUserCode() {
  return Cookies.get('UserCodeKey');
}

export function setUserCode(userCode: string) {
  return Cookies.set('UserCodeKey', userCode);
}

export function removeUserCode() {
  return Cookies.remove('UserCodeKey');
}

export function getDataSource() {
  return Cookies.get('DataSourceKey');
}

export function setDataSource(dataSource: string) {
  return Cookies.set('DataSourceKey', dataSource);
}

export function removeDataSource() {
  return Cookies.remove('DataSourceKey');
}
